package dataTypes;

import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

/*
 * index, google username,
 * 
 */

@PersistenceCapable(detachable = "true")
public class userDevice {
	
	public userDevice(String googleName, String deviceRegistrationID, String deviceID) {
		super();
		this.googleName = googleName;
		this.deviceRegistrationID = deviceRegistrationID;
		this.deviceID = deviceID;
		this.numUsed = 0;
		this.numTaken = 0;
		this.rating=100;
	}

	@PrimaryKey	
	@Persistent
	private String googleName;
	
	/**
     * The ID used for sending messages to.
     */
    @Persistent
    private String deviceRegistrationID;
    
    @Persistent
	private String deviceID;
    
    @Persistent
	public int numTaken;
	
	@Persistent
	public int numUsed;

	@Persistent
	public int maxNumOfNotifications;

	@Persistent
	public String location;

	@Persistent
	public int rating;
	
	public String getDeviceID() {
		return deviceID;
	}

	public String getDeviceRegistrationID() {
		return deviceRegistrationID;
	}

	public int getNumTaken() {
		return numTaken;
	}

	public void setNumTaken(int numTaken) {
		this.numTaken = numTaken;
	}

	public int getNumUsed() {
		return numUsed;
	}

	public void setNumUsed(int numUsed) {
		this.numUsed = numUsed;
	}

	
	public String getGoogleName() {
		return googleName;
	}

	public void setGoogleName(String googleName) {
		this.googleName = googleName;
	}

	public void setMaxNumOfNotification(int maxNumOfNotifications) {
		this.maxNumOfNotifications = maxNumOfNotifications;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public void setRating(int rate) {
		this.rating = rate;
	}
	
	public void setdeviceRegistrationID(String rId){
		this.deviceRegistrationID=rId;
	} 
	
	public void setdeviceID(String dId){
		this.deviceID=dId;
	} 
	
	
	public int getMaxNumOfNotification(int maxNumOfNotifications) {
		return this.maxNumOfNotifications;
	}

	public String getLocation(String location) {
		return this.location;
	}

	public int getType(int type) {
		return this.rating;
	}
	
}
